package com.sgb.kjwl.view.ui.adapter.pick;

import android.content.Context;

import com.sgb.kjwl.BR;
import com.sgb.kjwl.R;
import com.swgk.core.recyclerview.adapter.BaseRecycleAdapter;
import com.swgk.core.recyclerview.adapter.ItemViewHolder;
import com.swgk.core.util.PickSelectEntity;

import java.util.List;

public class PickHallBidingStatusAdapter extends BaseRecycleAdapter<PickSelectEntity> {

    private boolean flag;
    private PickSelectEntity entity;

    public PickHallBidingStatusAdapter(Context context, List<PickSelectEntity> datas) {
        super(context, R.layout.item_pick_hall_status, datas);
    }

    @Override
    public void convert(ItemViewHolder holder, PickSelectEntity provinceEntity) {
        holder.setBinding(BR.viewModel,provinceEntity);
//        if(null!=entity && entity.getNo().equals(provinceEntity.getNo())){
//            if(!flag){
//                holder.itemView.findViewById(R.id.root_layout).setSelected(false);
//                holder.itemView.findViewById(R.id.name_view).setSelected(false);
//            }else{
//                holder.itemView.findViewById(R.id.root_layout).setSelected(true);
//                holder.itemView.findViewById(R.id.name_view).setSelected(true);
//            }
//        }
    }

    public void setSelected(boolean f,PickSelectEntity e){
        flag = f;
        entity = e;
        notifyDataSetChanged();
    }
}
